import React from 'react';
import { Router, Route, Switch } from 'dva/router';
import IndexPage from './routes/IndexPage';
import Home from '../src/routes/Home/home'

//路由优化  统一配置
const RouteConfig=[{
  path:"/",
  component:IndexPage,
  routes:[
    {
      path:'/',
      component:Home,
      //重定向跳转
      redirect:true
    }
  ]
}]


function RouterConfig({ history }) {
  return (
    <Router history={history}>
      <Switch>
        <Route path="/"  component={IndexPage} />
      </Switch>
    </Router>
  );
}

export default RouterConfig;
